import request from "@/utils/request";

let onSelfApi = {
  // 回收订单  获取包赔资料填报链接
  backClueOrdercreateKey(params) {
    return request({
      url: `/backClueOrder/createKey`,
      method: "get",
      params,
    });
  },
  // 回收订单上传打款截图
  backClueOrderShangchuantu(data) {
    return request({
      url: `/backClueOrder/shangchuantu`,
      method: "post",
      data,
    });
  },

  // 黑号查询
  heihaoCheck(data) {
    return request({
      url: `/black/blackList?game_sn=${data.game_sn}&content=${data.content}`,
      method: "get",
      timeout: 1000 * 60 * 3
    });
  },
  //我的回收线索
  getBackClueList(query) {
    return request({
      url: "/backClue/list",
      method: "get",
      params: query,
    });
  },
  // 查询单个线索的详情
  getBackClueInfo(id) {
    return request({
      url: `/backClue/${id}`,
      method: "get",
    });
  },
  // AI估价
  backCluegujia(params) {
    return request({
      url: `/backClue/gujia`,
      method: "get",
      params,
    });
  },
  // AI估价 - 竞拍市场
  backCluebiddinggujia(params) {
    return request({
      url: `/backClue/bidding/gujia`,
      method: "get",
      params,
    });
  },

  // 回收线索拒收
  backClueJushou(data) {
    return request({
      url: `/backClue/jushou`,
      method: "post",
      data,
    });
  },

  // 创建回收订单  /backClueOrder
  backClueOrderAdd(data) {
    return request({
      url: `/backClueOrder`,
      method: "post",
      data,
    });
  },
  // 查询回收订单详情
  getBackClueOrderInfo(id) {
    return request({
      url: `/backClueOrder/${id}`,
      method: "get"
    });
  },
  // 查询商家的 收款账户列表
  getBankListByTenantId(params) {
    return request({
      url: `/userCollectionInfo/byTenantId`,
      method: "get",
      params,
    });
  },

  // 查询回收订单列表  回收商  包赔商
  getbackClueOrderList(params) {
    return request({
      url: `/backClueOrder/list`,
      method: "get",
      params,
    });
  },
  // 解散回收訂單群組 /backClueOrder/cancelGroup
  cancelGroup(data) {
    return request({
      url: `/backClueOrder/cancelGroup`,
      method: "post",
      data,
    });
  },
  // 恢复群组
  recoveryGroup(data) {
    return request({
      url: `/backClueOrder/recoveryGroup`,
      method: "post",
      data,
    });
  },
  // 修改回收订单
  backClueOrderupdateSome(data) {
    return request({
      url: "/backClueOrder/updateSome",
      method: "post",
      data
    });
  },
  // 完成换绑 /backClueOrder/changeBindState
  changeBindState(data) {
    return request({
      url: "/backClueOrder/changeBindState",
      method: "post",
      data
    });
  },
  // 取消订单 /backClueOrder/cancelOrder 
  backClueOrderCancelOrder(data) {
    return request({
      url: "/backClueOrder/cancelOrder",
      method: "post",
      data
    });
  },
  // 买家打款 /tenantFinancialStatement/back/buyerPayment
  backClueOrderbuyerPayment(data) {
    return request({
      url: "/tenantFinancialStatement/back/buyerPayment",
      method: "post",
      data
    });
  },

  // 完成订单 /backClueOrder/finishOrder
  backClueOrderFinishOrder(data) {
    return request({
      url: "/backClueOrder/finishOrder",
      method: "post",
      data
    });
  },
  // 申请售后  /backClueOrderAfter
  backClueOrderAfterAdd(data) {
    return request({
      url: "/backClueOrderAfter",
      method: "post",
      data
    });
  },
  // 回收订单 售后列表 /backClueOrderAfter/list
  getbackClueOrderAfterList(params) {
    return request({
      url: `/backClueOrderAfter/list`,
      method: "get",
      params,
    });
  },
  // 回收订单 查询售后详情
  getbackClueOrderAfterInfo(id) {
    return request({
      url: `/backClueOrderAfter/${id}`,
      method: "get"
    });
  },
  // 同意售后  /backClueOrderAfter/agree
  backClueOrderAfterAgree(data) {
    return request({
      url: `/backClueOrderAfter/agree`,
      method: "post",
      data
    });
  },
  // 拒绝售后  /backClueOrderAfter/refuse
  backClueOrderAfterRefuse(data) {
    return request({
      url: `/backClueOrderAfter/refuse`,
      method: "post",
      data
    });
  },
  // 获取商品信息  用于发布商品
  getGoodsContent(params) {
    return request({
      url: `/backClueOrder/getGoodsContent`,
      method: "get",
      params
    });
  },

  // 包赔订单  发起合同
  createContract(data) {
    return request({
      url: `/backClueOrder/createContract`,
      method: "post",
      data,
    });
  },
  // 包赔商  查看合同 /fdd/info/getDownLoadUrlById
  getDownLoadUrlById(params) {
    return request({
      url: `/fdd/info/getDownLoadUrlById`,
      method: "get",
      params,
    });
  },
  // 回收商 查看合同
  getContractUrl(id) {
    return request({
      url: `/fdd/info/${id}`,
      method: "get",
    });
  },

  // 回收商 发布到竞拍市场
  backClueToJingpai(data) {
    return request({
      url: `/backClue/jingjia`,
      method: "post",
      data
    });
  },

  // 创建自建订单
  backClueOrderCreateSelf(data) {
    return request({
      url: `/backClueOrder/createSelf`,
      method: "post",
      data
    });
  },
  // 删除自建订单   
  backClueOrderDelSelf(data) {
    return request({
      url: `/backClueOrder/delSelf`,
      method: "post",
      data
    });
  },
  // 编辑自建订单   
  backClueOrderEditSelf(data) {
    return request({
      url: `/backClueOrder/editSelf`,
      method: "post",
      data
    });
  },

  // 三方订单 匹配账号 导出模版   
  backClueOrderexportCheckModel(data) {
    return request({
      url: `/backClueOrder/exportCheckModel`,
      method: "get",
      responseType: 'blob',
    });
  },


};
export default onSelfApi;
